package yf.mall.entity;


import lombok.Getter;
import lombok.Setter;
import yf.mall.enums.AdaConfigEnum;

import java.io.Serializable;



@Setter
@Getter
public class AccCardEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long id;
    private Long userId;
    private String accName;
    private String bank;
    private String number;

    private String idCard;
    private String adaId;
    private String accBranch;

    public void setAdaId(String adaId,String name) {
        if(name.equals(AdaConfigEnum.douxin2.getName())){
            this.accBranch = adaId;
        }else {
            this.adaId = adaId;
        }
    }

    public String getAdaId(String name) {
        if(name.equals(AdaConfigEnum.douxin2.getName())){
            return accBranch;
        }
        return adaId;
    }

    public AccCardEntity(){

    }

}
